from building import *

group = []
if not GetDepend(['PKG_USING_ONENET_STUDIO_SDK']):
    Return('group')

cwd  = GetCurrentDir()
path = [cwd]
src	 = Glob('common/*.c')
src	 += Glob('onenet/thing_model/core/*.c')
src	 += Glob('onenet/utils/*.c')
src	 += Glob('protocols/coap/er-coap-13/*.c')
src	 += Glob('protocols/http/*.c')
src	 += Glob('protocols/mqtt/paho-mqtt/*.c')
src	 += Glob('security/*.c')
src	 += Glob('services/ota/adapter/*.c')
src	 += Glob('services/ota/core/*.c')
src	 += Glob('services/ota/core/*.c')
src	 += Glob('tools/cJSON/*.c')
src	 += Glob('tools/wolfssl/*.c')

path += [cwd + '/common']
path += [cwd + '/onenet/thing_model/core']
path += [cwd + '/onenet/utils']
path += [cwd + '/platforms/include']
path += [cwd + '/protocols/coap/er-coap-13']
path += [cwd + '/protocols/http']
path += [cwd + '/protocols/mqtt']
path += [cwd + '/protocols/mqtt/paho-mqtt']
path += [cwd + '/security']
path += [cwd + '/services/ota/adapter']
path += [cwd + '/services/ota/core']
path += [cwd + '/services/ota/core/http']
path += [cwd + '/tools/wolfssl/port']

src	 += Glob('platforms/rtthread/*.c')

src	 += Glob('onenet/thing_model/user/*.c')
path += [cwd + '/onenet/thing_model/user']

group = DefineGroup('onenet_studio_sdk', src, depend = ['PKG_USING_ONENET_STUDIO_SDK'], CPPPATH = path)

Return('group')